﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TeamFoundation.EventBus.Client;

namespace TestProject
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Subscribing...");
            Uri uri = new Uri("http://localhost:8081/tfs"); // TODO: Place your URL here.
            var sub = SubscriptionManager.CreateOrGet(uri, "test", ".\\private$\\testQueue", null);
            var qsub = sub.Subscribe();
            qsub.TfsNotification += new EventHandler<TfsEventArgs>(qsub_TfsNotification);
            qsub.Start();

            Console.WriteLine("Listening...");
            Console.ReadLine();
        }

        static void qsub_TfsNotification(object sender, TfsEventArgs e)
        {
            Console.WriteLine(e.EventData.Name);
        }
    }
}
